package com.ntschy.bt.entity.enums;


import com.baomidou.mybatisplus.annotation.EnumValue;
import com.baomidou.mybatisplus.core.enums.IEnum;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;

/**
 *
 * @author lxr
 *
 * 是否删除
 */
public enum BtHelpDelFlagEnum implements IEnum<Integer> {
    /**
     * 是否删除 0-正常 1-删除
     */
    NORMAL(0, "正常"),
    DELETE(1,"删除");


//    @JsonValue
    private final int value;

//    @JsonValue
    private final String desc;

    BtHelpDelFlagEnum(int value,String desc){
        this.value = value;
        this.desc = desc;
    }

    @Override
    public Integer getValue() {
        return this.value;
    }

    public String getDesc() {
        return desc;
    }

    @JsonCreator
    public static BtHelpDelFlagEnum BtHelpBackFromValue(int value){
        for (BtHelpDelFlagEnum examineResult : BtHelpDelFlagEnum.values()){
            if(examineResult.getValue() == value){
                return examineResult;
            }
        }

        return  null;
    }


}
